package com.nit.lab.model;

import javax.persistence.*;

@Entity
@Table(name = "base_order", schema = "coolprint", catalog = "")
public class BaseOrderEntity {
    private Integer orderId;
    private Integer userId;
    private String orderFiles;
    private String orderTime;
    private Double orderPay;
    private Integer fileCount;
    private Integer getIntegral;
    private String getTime;
    private Integer orderStatus;
    private String orderRemark;
    private Integer storeId;
    private Integer orderEvaluate;
    private String orderNub;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "orderId")
    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    @Basic
    @Column(name = "userId")
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "orderFiles")
    public String getOrderFiles() {
        return orderFiles;
    }

    public void setOrderFiles(String orderFiles) {
        this.orderFiles = orderFiles;
    }

    @Basic
    @Column(name = "orderTime")
    public String getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(String orderTime) {
        this.orderTime = orderTime;
    }

    @Basic
    @Column(name = "orderPay")
    public Double getOrderPay() {
        return orderPay;
    }

    public void setOrderPay(Double orderPay) {
        this.orderPay = orderPay;
    }

    @Basic
    @Column(name = "fileCount")
    public Integer getFileCount() {
        return fileCount;
    }

    public void setFileCount(Integer fileCount) {
        this.fileCount = fileCount;
    }

    @Basic
    @Column(name = "getIntegral")
    public Integer getGetIntegral() {
        return getIntegral;
    }

    public void setGetIntegral(Integer getIntegral) {
        this.getIntegral = getIntegral;
    }

    @Basic
    @Column(name = "getTime")
    public String getGetTime() {
        return getTime;
    }

    public void setGetTime(String getTime) {
        this.getTime = getTime;
    }

    @Basic
    @Column(name = "orderStatus")
    public Integer getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    @Basic
    @Column(name = "orderRemark")
    public String getOrderRemark() {
        return orderRemark;
    }

    public void setOrderRemark(String orderRemark) {
        this.orderRemark = orderRemark;
    }

    @Basic
    @Column(name = "storeId")
    public Integer getStoreId() {
        return storeId;
    }

    public void setStoreId(Integer storeId) {
        this.storeId = storeId;
    }

    @Basic
    @Column(name = "orderEvaluate")
    public Integer getOrderEvaluate() {
        return orderEvaluate;
    }

    public void setOrderEvaluate(Integer orderEvaluate) {
        this.orderEvaluate = orderEvaluate;
    }

    @Basic
    @Column(name = "orderNub")
    public String getOrderNub() {
        return orderNub;
    }

    public void setOrderNub(String orderNub) {
        this.orderNub = orderNub;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BaseOrderEntity that = (BaseOrderEntity) o;

        if (orderId != null ? !orderId.equals(that.orderId) : that.orderId != null) return false;
        if (userId != null ? !userId.equals(that.userId) : that.userId != null) return false;
        if (orderFiles != null ? !orderFiles.equals(that.orderFiles) : that.orderFiles != null) return false;
        if (orderTime != null ? !orderTime.equals(that.orderTime) : that.orderTime != null) return false;
        if (orderPay != null ? !orderPay.equals(that.orderPay) : that.orderPay != null) return false;
        if (fileCount != null ? !fileCount.equals(that.fileCount) : that.fileCount != null) return false;
        if (getIntegral != null ? !getIntegral.equals(that.getIntegral) : that.getIntegral != null) return false;
        if (getTime != null ? !getTime.equals(that.getTime) : that.getTime != null) return false;
        if (orderStatus != null ? !orderStatus.equals(that.orderStatus) : that.orderStatus != null) return false;
        if (orderRemark != null ? !orderRemark.equals(that.orderRemark) : that.orderRemark != null) return false;
        if (storeId != null ? !storeId.equals(that.storeId) : that.storeId != null) return false;
        if (orderEvaluate != null ? !orderEvaluate.equals(that.orderEvaluate) : that.orderEvaluate != null)
            return false;
        if (orderNub != null ? !orderNub.equals(that.orderNub) : that.orderNub != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = orderId != null ? orderId.hashCode() : 0;
        result = 31 * result + (userId != null ? userId.hashCode() : 0);
        result = 31 * result + (orderFiles != null ? orderFiles.hashCode() : 0);
        result = 31 * result + (orderTime != null ? orderTime.hashCode() : 0);
        result = 31 * result + (orderPay != null ? orderPay.hashCode() : 0);
        result = 31 * result + (fileCount != null ? fileCount.hashCode() : 0);
        result = 31 * result + (getIntegral != null ? getIntegral.hashCode() : 0);
        result = 31 * result + (getTime != null ? getTime.hashCode() : 0);
        result = 31 * result + (orderStatus != null ? orderStatus.hashCode() : 0);
        result = 31 * result + (orderRemark != null ? orderRemark.hashCode() : 0);
        result = 31 * result + (storeId != null ? storeId.hashCode() : 0);
        result = 31 * result + (orderEvaluate != null ? orderEvaluate.hashCode() : 0);
        result = 31 * result + (orderNub != null ? orderNub.hashCode() : 0);
        return result;
    }
}
